package com.jiawa.train.business.controller;


import com.jiawa.train.business.resp.StationQueryResp;
import com.jiawa.train.business.service.IStationService;
import com.jiawa.train.common.resp.CommonResp;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 车站 前端控制器
 * </p>
 *
 * @author hrz
 * @since 2025-09-07
 */
@RestController
@RequestMapping("/station")
@RequiredArgsConstructor
public class StationController {
    private final IStationService stationService;

    @GetMapping("/query-all")
    public CommonResp<List<StationQueryResp>> queryall() {
        List<StationQueryResp> pa = stationService.queryall();
        return new CommonResp<>(pa);
    }
}